package com.hnevc.gui;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class JPanelDemo extends JFrame {
	JPanel panel;
	JButton btnOK,btnCancel;
	public JPanelDemo(){
		this.setTitle("标题");
		this.setSize(400, 400);
		this.setLocation(200, 200);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		panel = new JPanel();
		btnOK = new JButton("确认");
		btnCancel = new JButton("取消");
		panel.add(btnOK);
		panel.add(btnCancel);
		this.add(panel);
		this.setVisible(true);
	}
	public static void main(String[] args) {
		new JPanelDemo();
	}
}
